<template>
<div>
  <div class="loader-base" v-if="showLoad"><div class="loader-wrap"></div></div>
  <header class="hd-top">
    <span class="iconfont icon-left" @click="goBack"></span>
    <h2 class="title">订单详情</h2>
    <button class="btn" @click="next">提货</button>
  </header>
  <div class="page">
    <ul class="mine-list mb20">
      <li class="displayflex gray">
        <span class="flex1">计划提货</span>
        <span>{{mainlist.OrdersPKGS}}</span>
      </li>
      <li class="displayflex">
        <span class="flex1">实际提货</span>
        <input type="text" class="txt-rit ft16" v-model="mainlist.OrdersPKGS"/>
      </li>
    </ul>
    <div class="detail-goods mb20">
      <div class="ft17 tit">商品信息</div>
      <div class="ctx">
        <div class="ft17 displayflex detail" v-for="item in goodslist">
          <div class="flex1 goods-unit">
            <p>{{item.GoodsName}}</p>
            <span class="ft14">商品编号：{{item.GoodsCode}}</span>
          </div>
          <div class="price"><span class="org">{{item.Pcks}}</span>件</div>
        </div>
      </div>
    </div>
  </div>
  
</div>
</template>

<script>
export default{
  data(){
    return{
      bbilllist: [],
      mainlist:[],
      goodslist: [],
      HandOver: [],
      bbillno: "",
      showLoad: true
    }
  },
  created() {
    this.getData();
  },
  methods:{
    goBack(){
      this.$router.go(-1);
    },
    next(){
      this.$router.push({
        path:'/pickUp',
        query:{id:this.$route.query.id}
      })
    },
    getData()
    {
      var guid = this.$route.query.id;
      var self = this;
      var query = {
        Guid: guid
      };
      this.Ajax.post("GetOrderDetail", query).then(function(resp) {
        self.showLoad = false;
        if (resp.IsSuccess) {
          self.bbilllist = resp.Data.Bill;
          self.mainlist =resp.Data.Main;
          self.goodslist = resp.Data.BbDetial;
          self.HandOver =resp.Data.HandOver;
        }
      });
    }
  }
}
</script>